package domain

import (
	"github.com/lab-online/internal/course/constant"
	"github.com/lab-online/internal/course/entity"
	"github.com/lab-online/internal/shared/code"
)

func (d *Domain) RemoveCourse(courseEntity entity.CourseEntity) error {

	if err := d.repository.DeleteCourse(courseEntity); err != nil {
		return code.ErrorPicker(err, code.DatabaseClassNotFound, constant.DBErrCourseNotFound)
	}

	return nil
}
